package architecture;

//PipelineRegister
public class PipelineInstructionRegister{
	MyInt instruction;
	MyInt instr_15_0;
	MyInt instr_15_11;
	MyInt instr_20_16;
	MyInt instr_25_21;
	
	MyInt instr_31_26;//OpCode
	MyInt instr_5_0;//FuncCode
	void clockEvent(){
		instr_15_0.i=MyUtil.bitsofint
			(instruction.i,15,0);
		instr_15_11.i=MyUtil.bitsofint
			(instruction.i,15,11);
		instr_20_16.i=MyUtil.bitsofint
			(instruction.i,20,16);
		instr_25_21.i=MyUtil.bitsofint
			(instruction.i,25,21);
		instr_31_26.i=MyUtil.bitsofint
			(instruction.i,31,26);
		instr_5_0.i=MyUtil.bitsofint
			(instruction.i,5,0);
	}
	void dump(){
		System.out.println("--------");
		System.out.println("PipelineInstructionRegister:");
		System.out.println("instruction:"+instruction);
		System.out.println("instr_15_0:"+instr_15_0);
		System.out.println("instr_15_11:"+instr_15_11);
		System.out.println("instr_20_16:"+instr_20_16);
		System.out.println("instr_25_21:"+instr_25_21);
		System.out.println("instr_31_26:"+instr_31_26);
		System.out.println("instr_5_0:"+instr_5_0);
		System.out.println("--------");
	}
}